package me.blankm.wslib.common;


import java.util.concurrent.ScheduledFuture;

import me.blankm.wslib.request.Request;

/**
 * Author by Mr.Meng
 * created 2021/11/16
 *
 * @desc 超时任务
 */
public class TimeOutTask {
    /**
     * 请求主体
     */
    private final Request request;
    /**
     * 通用返回
     */
    private final RequestCallBack tempCallback;
    /**
     * r任务
     */
    private final ScheduledFuture timeoutTask;


    public TimeOutTask(Request request, RequestCallBack tempCallback, ScheduledFuture timeoutTask) {
        this.tempCallback = tempCallback;
        this.timeoutTask = timeoutTask;
        this.request = request;
    }


    public RequestCallBack getTempCallback() {
        return tempCallback;
    }


    public ScheduledFuture getTimeoutTask() {
        return timeoutTask;
    }


    public Request getRequest() {
        return request;
    }
}
